
#if !defined (_MLCOLOR32_H)
#define _MLCOLOR32_H

#include "mlMath.h"

namespace ml
{

	//!	A RGBA Color class.
	/*! 
		32-bit RGBA color class each color component 
		is an unsigned char and should hold only 8-bits
		of data hence 0 to 255.
	 */
	class Color32
	{
	public:
		unsigned char 
			R, /*!< Red component. */
			G, /*!< Green component. */
			B, /*!< Blue component. */
			A; /*!< Alpha component. */

		/*!
			Default constuctor. sets all 
			components to 0 including alpha
		*/
		Color32(void);
		/*!
			usigned integer constuctor. sets the 
			components to the passed integers, 
			the four integers correspond R, G, B, A
			respectivly. The constructor doesn't yet 
			cap the passed values to have a max of 255.
		*/
		Color32(unsigned char, unsigned char, 
			unsigned char, unsigned char);
		/*!
			color constructor. sets the color
			to the color of the color object passed.
		*/
		Color32(const Color32 &);
		/*!
			default deconstructor. nothing special
			here (no code).
		*/
		~Color32(void);

		Color32 &operator =(const Color32 &);
		bool operator ==(const Color32 &) const;
		bool operator !=(const Color32 &) const;
		Color32 operator -(void) const;
		Color32 operator +(const Color32 &) const;
		Color32 operator -(const Color32 &) const;
		Color32 operator *(const Color32 &) const;
		Color32 operator *(const unsigned int) const;
		Color32 operator /(const Color32 &) const;
		Color32 operator /(const unsigned int) const;
		Color32 &operator +=(const Color32 &);
		Color32 &operator -=(const Color32 &);

		/*!
			public function to set all components of 
			the color object, exactly the same as 
			the color constructor that takes four integers
		*/
		void set(unsigned char, unsigned char, 
			unsigned char, unsigned char);
		/*!
			designed to return all four components as
			one 32-bit RGBA unsigned integer, contains 
			a problem does not currently function as wanted.
		*/
		unsigned int getUnsignedInt(void);

		Vec4 toVec4(void);

	protected:

	};

#define WHITE Color32(255, 255, 255, 255)
#define BLACK Color32(0, 0, 0, 0)

#define RED Color32(255, 0, 0, 255)
#define GREEN Color32(0, 255, 0, 255)
#define BLUE Color32(0, 0, 255, 255)

}

#endif